package com.mogu.user.mapper;

import com.mogu.entity.TUser;
import com.mogu.user.pojo.MyBlog;
import com.mogu.user.pojo.MyComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface UserMapper {

    TUser findByUserName(@Param("username") String userName);

    void insertUser(TUser tUser);

    int selectUserByUsername(@Param("username") String username);

    int selectUserByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    TUser selectOne(@Param("username") String username);

    void editUser(TUser tUser);

    /**
     * 通过uid查我的评论
     * @param uid
     * @return
     */
    List<MyComment> findMyCommentByUid(String uid);

    /**
     * 通过uid查我的博客
     * @param uid
     * @return
     */
    List<MyBlog> findMyBlogByUid(String uid);
}
